<!DOCTYPE html>
<html layout:decorate="~{layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

    <title th:text="#{screen.pac4j.unauthz.pagetitle}">Pac4j Stop Webflow View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>
</head>

<body>
<main class="container mt-3 mb-3" role="main">
    <div class="banner banner-danger mdc-card p-4 m-auto w-lg-66" layout:fragment="content">
        <div class="">
            <h2 th:utext="#{screen.pac4j.unauthz.heading}">Unauthorized Access</h2>
            <p th:utext="#{screen.pac4j.unauthz.message}">Either the authentication request was rejected/cancelled,
                or
                the authentication provider denied access due to permissions, etc. Review logs to find the root
                cause of
                the issue.</p>

            <div class="mdc-data-table">
                <table aria-label="Error information"
                       class="mdc-data-table__table w-100"
                       th:if="${error != null or reason != null or code != null or description != null}">
                    <thead>
                    <tr class="mdc-data-table__header-row">
                        <th class="mdc-data-table__header-cell">Error</th>
                        <th class="mdc-data-table__header-cell">Reason</th>
                        <th class="mdc-data-table__header-cell">Code</th>
                        <th class="mdc-data-table__header-cell">Description</th>
                        <th class="mdc-data-table__header-cell">Provider</th>
                        <th class="mdc-data-table__header-cell">Destination</th>
                    </tr>
                    </thead>
                    <tbody class="mdc-data-table__content">
                    <tr class="mdc-data-table__row">
                        <td class="mdc-data-table__cell" th:text="${error}">Error</td>
                        <td class="mdc-data-table__cell" th:text="${reason}">reason</td>
                        <td class="mdc-data-table__cell" th:text="${code}">code</td>
                        <td class="mdc-data-table__cell" th:text="${description}">description</td>
                        <td class="mdc-data-table__cell" th:text="${client}">client</td>
                        <td class="mdc-data-table__cell">
                            <a th:href="${service}" th:text="#{screen.pac4j.unauthz.gotoapp}">Goto
                                Application</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="d-flex">
            <a class="mdc-button mdc-button--raised mr-2" th:href="@{/login}">
                <span class="mdc-button__label" th:text="#{screen.pac4j.unauthz.login}">Back to CAS</span>
            </a>
            <a class="mdc-button mdc-button--outlined" th:href="${service}">
                <span class="mdc-button__label" th:text="#{screen.pac4j.unauthz.gotoapp}">Goto Application</span>
            </a>
        </div>
    </div>
</main>
</body>

</html>